import { request } from "../request";
import { API, ADMINAPI } from "../const";

export function getActivityList(shop_id) {
  return request({
    url: `${API}/activity/list/${shop_id}`,
  });
}

export function addActivity(data) {
  return request({
    url: `${ADMINAPI}/activity`,
    method: "post",
    data,
  });
}

export function deleteActivity(id) {
  return request({
    url: `${ADMINAPI}/activity/${id}`,
    method: "delete",
  });
}

export function updateActivity(data) {
  return request({
    url: `${ADMINAPI}/activity/${data.id}`,
    method: "put",
  });
}
